<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能数据分析助手</title>
    <link rel="stylesheet" href="/css/jquery.dataTables.css">
    <link rel="stylesheet" href="/css/home.css">
    <link href="/css/layui.css" rel="stylesheet">
    <style>
        /* 嵌入 CSS 代码 */
    </style>
</head>
<body>
<div class="container">
    <div id="leftSection">
        <h2>智能数据分析助手</h2>
        <div id="chatMessages" class="chat-messages">
            <!-- 聊天消息将动态添加到这里 -->
        </div>
        <div class="chat-input">
            <input type="text" id="chatInput" placeholder="请输入分析问题...">
            <button id="sendRequestButton">发送</button>
        </div>
    </div>

    <div id="rightSection">
        <h2>数据展示</h2>
        <div id="loading" style="display: none;">加载中...</div>
        <div id="chartButtons" style="display: none;">
            <button onclick="changeChartType('bar')">柱状图</button>
            <button onclick="changeChartType('line')">折线图</button>
            <button onclick="changeChartType('radar')">雷达图</button>
            <button onclick="changeChartType('pie')">饼图</button>
            <button onclick="changeChartType('doughnut')">环形图</button>
        </div>
        <div id="tableContainer">
            <table id="dynamicTable">
                <thead id="tableHead">
                <!-- 表头将在这里动态生成 -->
                </thead>
                <tbody id="tableBody">
                <!-- 表格数据将在这里动态生成 -->
                </tbody>
            </table>
        </div>
        <canvas id="myChart"></canvas>
    </div>

    <!-- 弹出表单 -->
    <div id="modal" class="modal">
        <div class="modal-content">
            <span id="close" class="close">&times;</span>
            <h2>填写信息</h2>
            <form id="infoForm">
                <label for="name">姓名:</label>
                <input type="text" id="name" name="name" required>
                <br><br>
                <label for="email">电子邮件:</label>
                <input type="email" id="email" name="email" required>
                <br><br>
                <button type="submit">提交</button>
            </form>
        </div>
    </div>
</div>

<script src="/js/jquery-3.6.0.min.js"></script>
<script src="/js/jquery.dataTables.js"></script>
<script src="/js/chart.js"></script>
<script src="/js/layui.js"></script>
<script src="/js/index.js"></script>
<script>

</script>
</body>
</html>
